package cn.itsource.user.controller;

import cn.itsource.user.service.IWxUserService;
import cn.itsource.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/wechat")
public class WxUserContorller {

    @Autowired
    private IWxUserService wxUserService;

    @PostMapping("/login")
    public AjaxResult login(@RequestBody Map<String,String> map){
        return  wxUserService.login(map);

    }

    @PostMapping("/bind")
    public AjaxResult bind(@RequestBody Map<String,String> map){
        return  wxUserService.bind(map);

    }
}
